<%@ page import="org.springframework.ui.Model" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>提现详情</title>
	<meta name="decorator" content="default"/>
	<script language="javascript" src="/static/jquery/jquery-1.8.3.js"></script>
	<script src="/static/lodop/LodopFuncs.js" type="text/javascript"></script>
	<object id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width="0" height="0">
		<embed id="LODOP_EM" type="application/x-print-lodop" width="0" height="0" pluginspage="install_lodop32.exe"></embed>
	</object>
	<script type="text/javascript">
        var LODOP; //声明为全局变量
        function prn_preview() {
            CreateFormPage();
            var status = LODOP.PREVIEW();
            alert(status);
        };
        function formSubmit(type) { //1 打印 2 处理
            if (type == 2) { //处理结果
                if (confirm('是否确定？')) {
                    document.getElementById("userWithdrawType").value=2;
                    document.getElementById("inputForm").submit();
                }
            } else if (type == 1) { //打印
                document.getElementById("userWithdrawType").value=1;
                alert("处理打印")
                document.getElementById("inputForm").submit();
            }
            else {
                document.getElementById("userWithdrawType").value="";
                alert("type为空")
                document.getElementById("inputForm").submit();
            }

        }
        function CreateFormPage() {
            var printValue = document.getElementById("my_print").innerHTML;
            LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
            LODOP.PRINT_INIT("打印控件功能演示_Lodop功能_表单一");
            LODOP.SET_PRINT_STYLE("FontSize", 18);
            LODOP.SET_PRINT_STYLE("Bold", 1);
//            LODOP.ADD_PRINT_TEXT(50, 231, 260, 39, "打印页面部分内容");
            LODOP.ADD_PRINT_HTM(88, 200, 800, 600, printValue);
        };
	</script>

</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}//order/userOrder/listWithdraw">提现列表</a></li>
		<li class="active"><a href="${ctx}/order/userOrder/withdrawDetail?transactionId=${userWithdraw.id}">提现详情</a></li>
	</ul><br/>
	<form:form id="inputForm" modelAttribute="userWithdraw" action="${ctx}/order/userOrder/handleWithdraw" method="post" class="form-horizontal">
	<table id="fade"
		class="table table-striped table-bordered table-condensed">
		<tr>
			<td>申请id号：${userWithdraw.userId}</td>
			<td>注册手机号：${userWithdraw.phone}</td>
			<td>累计提现次数：${userWithdraw.moneyWithdrawTimes}</td>
			<td>角色：${userWithdraw.userRole}</td>
		</tr>
		<tr>
			<td>收款单位/用户名</td>
			<td colspan="3">${userWithdraw.userName}</td>
		</tr>
		<tr>
			<td>收款单位开户行</td>
			<td colspan="3">${userWithdraw.bankName}</td>
		</tr>
		<tr>
			<td>账号</td>
			<td colspan="3">${userWithdraw.bankNumber}</td>
		</tr>
		<tr>
			<td colspan="2">付款金额(大写)：${userWithdraw.factMoneyCN}</td>
			<td colspan="2">￥${userWithdraw.factMoney}</td>
		</tr>
		<tr>
			<td>付款性质：</td>
			<td colspan="3">${userWithdraw.description}</td>
		</tr>
		<tr>
			<td colspan="4">
				<label>备注：</label>
				<label>累计入账金额：${userWithdraw.moneyWithdrawTotal}</label>
				<label>历史已提现金额：${userWithdraw.moneyWithdrawHistoryed}</label>
				<label>已冻结金额：${userWithdraw.moneyFreeze}</label>
				<label>本次提现后的余额：${userWithdraw.moneyWithdrawRemainder}</label>
			</td>
		</tr>
	</table>
		<input type="radio" name="status" value="0" checked = checked>打款成功
		<input type="radio" name="status" value="-1">打款失败
	<input id="userWithdrawId" name="transactionId" type="hidden" value="${userWithdraw.id}"/>
	<input id="userWithdrawMoney" name="money" type="hidden" value="${userWithdraw.money}"/>
	<input id="userWithdrawUserId" name="userId" type="hidden" value="${userWithdraw.userId}"/>
	<input id="userWithdrawUserId" name="nickname" type="hidden" value="${fns:getUser().nickname}"/>
	<input id="userWithdrawType" name="type" type="hidden" value=""/>
		<div class="form-actions">
			<shiro:hasPermission name="payment:transactionRecord:edit"><input id="btnSubmit" class="btn btn-primary" type="button" value="打印" onclick="formSubmit(1)" />&nbsp;</shiro:hasPermission>
			<shiro:hasPermission name="payment:transactionRecord:edit"><input id="btnFail" class="btn btn-primary" type="button" value="处理" onclick="formSubmit(2)" />&nbsp;</shiro:hasPermission>
			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
		</div>
	</form:form>
	<div id="my_print">
		<p align="center"><b>成都宜安客打款单</b></p>
		<p align="center">流水编号：&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;年 &emsp;&emsp;&emsp; 月&emsp;&emsp;&emsp;  日      &emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp; 第${userWithdraw.printTimes}次打印</p>
		<table border="1" cellpadding="0" cellspacing="0" align="center">
			<tr>
				<td>申请ID号：${userWithdraw.userId}</td>
				<td>注册手机号：${userWithdraw.phone}</td>
				<td>累计提现次数：${userWithdraw.moneyWithdrawTimes}</td>
				<td>角色：${userWithdraw.userRole}</td>
			</tr>
			<tr>
				<td>收款单位/用户名</td>
				<td colspan="3"></td>
			</tr>
			<tr>
				<td>收款单位开户行</td>
				<td colspan="3">${userWithdraw.userName}</td>
			</tr>
			<tr>
				<td>账号</td>
				<td colspan="3">${userWithdraw.bankNumber}</td>
			</tr>
			<tr>
				<td colspan="2">付款金额（大写）：${userWithdraw.factMoneyCN}</td>
				<td colspan="2">￥${userWithdraw.factMoney}</td>
			</tr>
			<tr>
				<td colspan="4">付款性质：${userWithdraw.description}</td>
			</tr>
			<tr>
				<td>备注：累计入账金额：${userWithdraw.moneyWithdrawTotal}</td>
				<td>历史已提现金额：${userWithdraw.moneyWithdrawHistoryed}</td>
				<td>已冻结金额：${userWithdraw.moneyFreeze}</td>
				<td>本次提现后的余额：${userWithdraw.moneyWithdrawRemainder}</td>
			</tr>
		</table>
		<p align="center">会计:&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;出纳：&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;发起人：&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;</p>

	</div>
</body>
</html>